Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 华为p30、华为p30 pro 录制和播放视频异常问题 #56

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Junkmer
Copy link

@Junkmer Junkmer commented Dec 31, 2024

(cherry picked from commit 813fa2b)

2、解决 华为p30、华为p30 pro 无法播放视频功能
@Junkmer
Copy link
Author

Junkmer commented Jan 1, 2025

问题已自测验证通过

@AlexV525
Copy link

问题的 trace 是否能拉出?直接把库换掉意义不明。

@Junkmer
Copy link
Author

Junkmer commented Jan 13, 2025

问题的trace是否能拉出?直接把库换掉意义不明。

问题描述;
使用 华为P30 、P30 Pro通过 im Flutter v1 demo 播放和录制视频 均出现异常。

报错如下:

/MediaCodec(16929): Codec reported err 0x80001001, actionCode 0, while in state 6

I/CCodecBufferChannel(16929): [c2.android.aac.decoder#147] Created output block pool with allocatorID 16 => poolID 35 - OK

D/CCodecBufferChannel(16929): [c2.android.aac.decoder#147] Configured output block pool ids 35 => OK

D/SurfaceUtils(16929): disconnecting from surface 0x7c44905010, reason disconnectFromSurface

D/BufferPoolManager(16929): client death recipient registered 72711236467389

D/BufferPoolManager(16929): register new connection 3935925054029

E/MediaCodecVideoRenderer(16929): Video codec error

E/MediaCodecVideoRenderer(16929): java.lang.IllegalStateException

E/MediaCodecVideoRenderer(16929): at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)

E/MediaCodecVideoRenderer(16929): at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2789)

E/MediaCodecVideoRenderer(16929): at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:108)

E/MediaCodecVideoRenderer(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1994)

E/MediaCodecVideoRenderer(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:873)

E/MediaCodecVideoRenderer(16929): at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:1018)

E/MediaCodecVideoRenderer(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)

E/MediaCodecVideoRenderer(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)

E/MediaCodecVideoRenderer(16929): at android.os.Handler.dispatchMessage(Handler.java:106)

E/MediaCodecVideoRenderer(16929): at android.os.Looper.loop(Looper.java:219)

E/MediaCodecVideoRenderer(16929): at android.os.HandlerThread.run(HandlerThread.java:67)

E/ExoPlayerImplInternal(16929): Playback error

E/ExoPlayerImplInternal(16929): androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(2, null, null, video/avc, avc1.64000A, -1, null, [1080, 2340, 24.049519, ColorInfo(BT601, Limited range, SDR SMPTE 170M, false, 8bit Luma, 8bit Chroma)], [-1, -1]), format_supported=YES

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:640)

E/ExoPlayerImplInternal(16929): at android.os.Handler.dispatchMessage(Handler.java:106)

E/ExoPlayerImplInternal(16929): at android.os.Looper.loop(Looper.java:219)

E/ExoPlayerImplInternal(16929): at android.os.HandlerThread.run(HandlerThread.java:67)

E/ExoPlayerImplInternal(16929): Caused by: androidx.media3.exoplayer.video.MediaCodecVideoDecoderException: Decoder failed: OMX.hisi.video.decoder.avc

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1982)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:893)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:1018)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)

E/ExoPlayerImplInternal(16929): ... 3 more

E/ExoPlayerImplInternal(16929): Caused by: java.lang.IllegalStateException

E/ExoPlayerImplInternal(16929): at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)

E/ExoPlayerImplInternal(16929): at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2789)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:108)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1994)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:873)

E/ExoPlayerImplInternal(16929): ... 6 more

E/ExoPlayerImplInternal(16929): Disable failed.

E/ExoPlayerImplInternal(16929): java.lang.IllegalStateException

E/ExoPlayerImplInternal(16929): at android.media.MediaCodec.native_flush(Native Method)

E/ExoPlayerImplInternal(16929): at android.media.MediaCodec.flush(MediaCodec.java:2194)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.flush(SynchronousMediaCodecAdapter.java:168)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:960)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:953)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:780)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:794)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.BaseRenderer.disable(BaseRenderer.java:220)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1846)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1566)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1523)

E/ExoPlayerImplInternal(16929): at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:686)

E/ExoPlayerImplInternal(16929): at android.os.Handler.dispatchMessage(Handler.java:106)

E/ExoPlayerImplInternal(16929): at android.os.Looper.loop(Looper.java:219)

E/ExoPlayerImplInternal(16929): at android.os.HandlerThread.run(HandlerThread.java:67)


播放报错因:华为手机,解码不成功引起,由于 flutter uikit 中播放视频使用的是第三方插件,因此最快的解决办法就是替换稳定性更强的插件。

此问题网上已有其他人反馈
https://blog.csdn.net/wgx8635/article/details/143787020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants